fix MSVC build failures in CI after commit 1e5e8e2f (cherry picked from commit a2f8cf8fc0c6f4fe8a904284060f61f19f129efa)