Thermocurable polymers as resists for imprint lithography