Libcurl has some times cannot get tile image

libcurl sometimes cannot get an image of a tile, but I can view the image from the web browser with the URL. I found that because libcurl gets the wrong Context-Type from the response.
I try to use libcpr and WinHTTP to do it. Both of them can download image data success, but libcpr needs at least c++17 for the build, When I change the C++ standard of MapWinGIS project to 17, have some build errors. So I want to know how to build MapWinGIS with c++17 or later.

The URL I used is at blew, you can replace {XXX}, {YYY}, {ZOOM} with a specific value
https://bgn1.gpstool.com/vt/lyrs=s&hl=zh-CN&gl=cn&scale=1&x={XXX}&y={YYY}&z={ZOOM}