Emulate curl_easy_getinfo and CURLINFO_RESPONSE_CODE in curl-shim.