Minor changes to be C++ compatible.