Analysis and suppression of high-order diffractions in liquid-crystal-based spatial light modulator for photonic switch application