Have autoconf determine the location of ncurses headers.
Added AC_CHECK_LIB -lnsl and -lsocket for Solaris.