Add extern "C" wrapper for C++ compatibility