Fix types so it compiles to OCaml 4