Modified edge finite elements for photonic crystals