updated to work with newer ocaml-cow