added extern "C" define to header files to make including the header files from c++ more convenient