Fix build errors on Visual Studio 2010