OCaml bindings: add some missing functions and testcases.