write_http: make sure CURLOPT_* only get longs