Changed order of define/exports/window.
Merge pull request #6 from sgade/master

Changed order of define/exports/window.