Fix building under recent ocamlbuild
Add C version for comparison