Sample-size dependence of the magnetic critical current density in MgB2 superconductors