Polarization of hard X-rays from solar flares