Fixes for the C++ compile