Fixed some VS2010-related errors

Visual Studio still does not compile the code.