Reference the window and document object directly as the globalDocument variable
is not available when the deferUntilReady method is called
Merge pull request #260 from andrewscode/master

Reference the window and document object directly