Polarization properties of planar dielectric waveguide gratings.