configure: Avoid hard-coded ld path on Windows
The fix to #17962 (closed) ended up regressing on Windows as it failed to replicate the logic responsible for overriding the toolchain paths on Windows. This resulted in a hard-coded path to a directory that likely doesn't exist on the user's system (#18550 (closed)).
Edited by Ben Gamari