fixes sporadic problem with tests in MinGW-w64 build