add __cplusplus macro for extern "C"