Fix C++ compiler build

Isolate C code with extern C.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>