core: Restore get_max_fds optimization on Linux