move functions to commonjs modules

closes #355
change build task

- build task should create a compiled unminified version of the lib
Merge pull request #357 from epeli/commonjs-modules

move functions to commonjs modules