Win32 test fixes

Fixes issue #2361 as well as another issue I noticed when running the test suite on Win32, x86, MSVC 12.0. I intend to merge this as soon as Travis signs off.