Synthesis of biomimetic light-driven molecular switches via a cyclopropyl ring-opening/nitrilium ion ring-closing tandem reaction