fixed mocha to work in browser and karma