add function json_encode() for old version php environment