Support commonjs module scheme.

Fix for https://pusher.tenderapp.com/discussions/requests/1004-support-nodejs-jsdom-client-side-testing