Dimension dependence of the critical exponent in spherically symmetric gravitational collapse