change fileupload to new curlfile if php version is greater than 5.5