NetBSD has its own curses implementation and initscr() does not terminate with an error if TERM is not set properly. Instead check the return value and exit if an initialization error occurs.