Design of a photonic crystal differential phase comparator for a Mach–Zehnder switch