Make pycurl thread safe