Fix support of UMD. See https://github.com/umdjs/umd/blob/master/returnExports.js
Merge pull request #6 from mazurov/master

Fix to support UMD (Universal Module Definition) pattern