Fix #451: Build broken on OSX.

Problem:  Build breaks in OSX if macports ncurses present, due to
          header conflict involving 'term.h'.
Solution: Modify include search order.