Fixed Visual Studio 2013 compiler errors.

Project compiles under Windows but doesn't run as intended.