src: fix WITH_GENERIC_STREAM() type check bug

The handle object was checked against the wrong constructor template.
Put another way, it was unwrapped as the wrong StreamWrap type.