silence some anti-posix spam from windows
silence some 'we know' already warnings from msvc
put windows magic in cmake
generalize to all windows, not just msvc