Ensure stream_set_read_buffer is available
Merge branch 'issue/3116' into 1.3.x