Convert come FFI bindings to use the capi calling convention