some hacks to work on windows with MSYS