fix several compilation errors with VC++ 2013