Fix CommonJS issues for contexts without `module` global

This pull request fixes issues #49 and #51 in CommonJS contexts that doesn't provide the `module` global by implementing a slightly tweaked version of https://github.com/umdjs/umd/blob/master/commonjsStrictGlobal.js

The adjustments made are just to pass in the expected `root` to still allow the jQuery version to work.
> doesn't this mean that you're also exporting the PubSub object as a global here.

It does
> Also why is the "exports" module needed? Is this something supported by all AMD implementations?

That's a good question. It's [supported by RequireJS](https://github.com/jrburke/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#exports), don't know about others.

> What was wrong with the factory returning the PubSub object?

Just consistency, since for some environments, the return value was not used