Fixes for MinGW (unix)