Improve CommonJS Enviroment check

I was bitten by this kind of issues using Enquire.js:
https://github.com/jquery/qunit/issues/190
https://github.com/mroderick/PubSubJS/issues/13

To fix these issues I improved the CommonJS check, instead of just asking for the existence of module.exports, we ask if the exports global is an object (ad PubSubJS did)

Thanks.