Added extern "C" guards.