tools: minor win fix
tools: play nice with mingw/cygwin