The reaction may be performed in a solvent such as water or an organic solvent such as a nitrile e.g. acetonitrile or an alcohol, e.g. ethanol or an amide e.g. dimethylformamide in the presence of a base such as an alkali metal carbonate or hydroxide, e.g. sodium, potassium or caesium carbonate, or sodium, potassium or lithium hydroxide, at an elevated temperature e.g. the reflux temperature.