tests: add C++ FFI test to detect bug #737