Add 'extern "C"' to function declaration to allow linking with C++ code