Fix curl_close in WMSProxy