OCaml backend: better handling of the output of processes