fix var_export by using RETVAL_*