move window reference up to class
bring back original version
Merge pull request #1 from Shopify/window-on-class

Move window reference up to class