Assign module.exports if it exists, to support npm and browserify
Merge pull request #20 from ahultgren/npm-support

Npm support