On the calculation of Jc from magnetization measurements on superconductors