A few fixes for MinGW64.