Make guiders attach to window object more reliably

This fix ensures that the guiders object attaches to window correctly in more cases.

Previously if a build tool such as require.js wrapped the guiders.js contents in a closure then the "guiders" object would not be available outside that closure