packet: restrict to ocaml 4+ (due to use of `List.iteri`)