Support both AMD or CommonJS by using UMD returnExports

Fixes #9