Few fixes for Windows MinGW