change WIN32 to _MSC_VER for dllimports

avoids undefined references in pathlib for MinGW