add extern C for use with C++ apps