Scaling of the anomalous Hall effect in the insulating regime