...and found that it didn't work under Firefox because the typeof
RegExp is 'function' rather than 'object'. This required modification
of the switch in Object.prototype.toJSONString to add a fall-through
case for 'function'.