Fix compiler errors in VS2013