add hacks for buggy pycurl before 7d34468