Add CommonJS support

Makes it a little more intiuative to use with CommonJS supporting build tools (such as webpack).

The minified build will still need to be updated.