build: ifdef for mingw/non-mingw builds