Can't you simply define it this way? (I don't think I'm using any new features, so maybe I misunderstood your question.)
OCaml version 4.00.1
# external id : 'a -> 'b = "%identity";;
external id : 'a -> 'b = "%identity" # let foo ?(f = id) x = f x;; val foo : ?f:('a -> 'b) -> 'a -> 'b = <fun>