Fix the Mocha test shim to actually work better instead of my original hack.