equality for `define-cstruct'-generated wrappers

Closes PR 13650

Merge to v5.3.4