PHP < 5.3 compatibility with json_encode usage.