Optical switching by variation of the squeezing phase