fix compile in mingw