The role of surface currents in the magnetization of hysteretic superconductors