Makefile fixes for mingw