Chemical evolution. III. Photochemical conversion of enaminonitriles to imidazoles