use umd to export module

The way pun export is not support browserify right now

this patch is to use [umd](https://github.com/umdjs/umd) for universal module export

for JavaScript modules that work everywhere.