fixed libcurl crashing when used in multiple threads on linux