Cherry pick r161635 to fix the cURL build.