Fix linking issues on Windows using MSVC.