Added extern "C" to functions.