fixed mocha integration

Thanks to James Mead for the help!
https://github.com/freerange/mocha/issues/193