ccgvis.js: bugfix for Chrome, which does not support the flags arg of String.replace()