use WRITEFUNCTION to be compatible to pycurl 7.19.0