SOme fixes for mingw build