Fix compilation errors when building with Visual Studio 2012.