[fix] for broken web

adds universal module definition ([UMD](https://github.com/umdjs/umd/blob/master/returnExports.js)) to make it work as AMD and window global