Adds CommonJS support

* Adds CommonJS support
* General [UMD](https://github.com/umdjs/umd) optimization