Add extern C guard for C++

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
5 jobs for cpp in 34 seconds (queued for 6 seconds)