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

I think that goes against the idea of AMD allowing you to keep the global namespace clean. What's the rationale behind this? If someone wants a global they can always export it themselves? But this could cause problems in places where AMD is used to avoid polluting the global namespaces, extensions and bookmark lets being a good example.