Make compatible with CommonJS module systems.

This PR makes it so analytics can be `require`'d. and used with browserify.