Fixed linker errors when building tests on Windows.