htable: fix type of cmpfn in htable_type