Influence of higher harmonics of the undulator in X-ray polarimetry and crystal monochromator design.