The compounds of the invention can be prepared by a process which comprises reacting imidazole with a carbamoyl halide or thiocarbamoyl halide of the general formula Z--CXNR1 R2 (IV) in which R1, R2 and X are as defined above in formula I and Z is halogen, for example chlorine or bromine and preferably chlorine.