[stream] use a named function

fixes export