Preparation of derivatives of isocyanic acid