Optical anisotropy and pinning of the linear polarization of light in semiconductor microcavities