Possible solution for #213. Retry EAGAIN/EWOULDBLOCK during syswrite

See #213 for details.