helpers: update defwrap to support structs