to make our code work with multiple ocamlgraph versions, we are using this snippet in one of our files
#if OCAMLGRAPH_VERSION >= (2,0,0) let module Dom = Dom