Transition from fractal to non-fractal scalings in growing scale-free networks