Small fixups in preparation for IOCP support.