account for a bug in Firefox's JSON.stringify