Fix 'make test' fail to build on Windows(MSVC)
Merge pull request #2014 from kyab/fix_msvc_build_test

Fix 'make test' fail to build on Windows(MSVC)