fix mingw32/64 build:

MinGW uses system installed libcurl, rather than libcurl_imp.
set libws2_32 as standard library for mingw.
Merge pull request #6945 from John-He-928/mingw-build

Fix MinGW build