Fix `make check` on win32

Closes #10452.