curl_file_create for older versions of php.