term.h on NetBSD does not include termios.h
Fix sys/time.h
Pull the FreeBSD timespec macros.
Fix library checking on NetBSD.
Disable _acs_char on NetBSD.