Match enumeration index between c stub and ocaml