OCaml backend: correct handling of integers (respect the semantics, but might be inefficien)