Fixes https://github.com/microsoft/vcpkg/issues/36661
Fix calling curl using config mode.
- [X] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] ~~SHA512s are updated for each updated download.~~
- [ ] ~~The "supports" clause reflects platforms that may be fixed by
this new version.~~
- [ ] ~~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~~
- [ ] ~~Any patches that are no longer applied are deleted from the
port's directory.~~
- [ ] ~~The version database is fixed by rerunning `./vcpkg
x-add-version --all` and committing the result.~~
- [ ] ~~Only one version is added to each modified port's versions
file.~~
Compile test pass with following triplets:
```
x64-windows
arm64-osx
```