fixes sporadic problem with tests in MinGw-w64 build