FFI with C++: generated callback functions are static (and test it)

Fix #737

Reported-by: Jean-Christophe Beaupré
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>