apply full patch from https://raw.github.com/kdrvn/karma-teamcity-reporter/8affc404c58b1d193918b2f14dc42e968f264bf7/index.js