Support commonjs module scheme.

Fix for https://pusher.tenderapp.com/discussions/requests/1004-support-nodejs-jsdom-client-side-testing.

I updated the logic to protect against the module global variable being set. exports, module, & module.exports need to be truthy for this to apply.