Made a change so text.js plays nicer with node-webkit (see https://github.com/rogerwang/node-webkit/issues/621)