[PATCH v2 15/15] tools/nolibc: implement wait() in terms of waitpid()