Fix bypass for window.printOnLoad if onLoad undefined