Move some initialization code from *Stream to _StreamBase