Modified to be able to set CURLOPT_NOSIGNAL