Fix for a JSON encoding "quirk" in PHP