fix C++ support