Fix usage of JSON_* constants in PHP 5.3