makes Error toJSON property writable