Added missed include to compile on NetBSD.

<sys/wait.h> is needed for WIFEXITED and WEXITSTATUS macros.

Thanks Leonardo Taccari for this patch.