Export to module.exports if it exists, even if window exists too. Lets it work with browserify.
Merge pull request #69 from trevordixon/browserify

Let it work with browserify