Really fix curl on Windows, this time after confirming it builds and links correctly. Ticket #3979
Merge in curl build fix from 8.0 branch. Ticket #3979