add C++ compatibility in header