Cxx fixes

extern "C" placement and include file ordering to fix C++ integration problems.