Libcurl download file to memory