Unix: fix fdstream flag check (checked fdstream flags instead of stream)
Windows: Retain fdstream for pending reads (as well as pending writes)