Controlling the ellipticity of attosecond pulses produced by laser irradiation of overdense plasmas