The 2-torsion subgroups of the class groups of cubic fields