makefile: fixes for win32 and unix