amended the defn of print as per js_of_ocaml's warning