fixes for Boost.System on cygwin/mingw