Make C++ linking compliant

This patch allows the library to be compiled and linked to C++ code.

Signed-off-by: Giuseppe Massari <joe.massanga@gmail.com>