Fix build issues for Visual Studio 2008