Sync with upstream OpenBSD fts.c.