Simplified the jscoverage code. Hopefully upstreams accepts this change.