Fix bypass for window.printOnLoad if onLoad undefined

Avoid error if onLoad is not defined for other print as print profile