Fix compiler errors in Visual Studio 2010