Update index.js

Apply UMD returnExports.js pattern.