consoletype.c: add missing include <sys/types.h>

major() requires <sys/types.h> according to man 3 makedev.  This bug
shows up on a musl system, but not glibc or uclibc because of a
difference in the way the headers stack.