bugfixes for mingw compilation

The tests folder fail to cross-compile with MinGW because:
1) assumption that compiling under Windows implies that MSVC is being used
2) assumption that file system is case-insensitive
This occurs in zeromq4-x too.

The workaround is for (1) is to further test for _MSC_VER before using MSVC-specific functions.

It might perhaps be better to simply not use any MSVC-specific code at all.