Contribution of surface currents to magnetic hysteresis in the mixed state of a type II superconductor