FIX: implement libcurl openssl thread-safe locking
Merge pull request #3112 from koying/fixcurlopenssl

FIX: implement libcurl openssl thread-safe locking