ext/curl/interface.c: properly free CURLOPT_HEADERFUNCTION to avoid memory leak