Add termcap detection