An efficient synthesis of quinazolines: a theoretical and experimental study on the photochemistry of oxime derivatives