Make it work with node, mocha and jsdom
Merge pull request #1 from joscha/fix-for-node-mocha-jsdom

Make it work with node, mocha and jsdom