Add commonjs export and package.json

This allows consumers to bundle the module with commonjs loaders like browserify and webpack. It can also be published to npm!