fix mingw32/64 build:

MinGW uses system installed libcurl, rather than libcurl_imp.
set libws2_32 as standard library for mingw.
Merge pull request #6946 from hanjukim/skip-utf8-bom

Skip UTF8 BOM if it exists and bug fix for unterminated string
[ci skip]
[ci skip]
Merge pull request #6945 from John-He-928/mingw-build

Fix MinGW build