Fix C++ build on VS2012