Preparation and properties of macroreticular resins containing thiazole and thiazoline groups