Geometric quantum pumping in the presence of dissipation