Exploiting the CNC side chain in heterocyclic rearrangements: synthesis of 4(5)-acylamino-imidazoles.