Modified native_stream.c from stream.c to include export option.