Add curl file uploading for php5.5+