Changed order of define/exports/window.

I was testing the sloc module within Atom but noticed it always returned an empty `Object {}`.
I guess this is due to the fact that there is a window object present, however, packages should still use `module.exports`. Changing the order of appearance, the module works as expected.