Influence of the electron beam emittance on the polarization of a laser--electron X-ray generator