lib/tsocket: workaround sockets not supporting FIONREAD