Fix computation of max_fd on OpenBSD.  Issue #23852.