Proper register autoloder in static class method