xcmd: include types.h and wait.h to use WEXITSTATUS and WIFEXITED

This fixes a bug reported by @kaushalmodi in #131.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>