stream: check for EWOULDBLOCK in addition to EAGAIN.