More Windows build fixes by Ivan Mahonin