Critical current density from magnetization hysteresis data using the critical-state model