Use rb_wait_for_single_fd when available instead of deprecated rb_thread_select