Add Windows-related preprocessor flags to CXXFLAGS.
Some Windows-related ifdefs for cpp_test.cpp.
Add some missing exported functions for Windows DLL.