Transport properties of helium near the liquid-vapor critical point. IV. The shear viscosity of3He and4He