add missing c++ extern "C" wrapping to link.h