Lazily load profiler hooks

This gives a small (~3%) gain on rendering without profiling enabled, and cleans up the invocation graph a bit.
I wanted to not break backwards compatibility