Use getmaxyx instead of LINES and COLS

I'm using NCurses for the first time and several places across the web I've read that we shouldn't be reading LINES and COLS directly.

Assuming it is correct this patch doesn't change the interface at all, it just uses the more recommended technique for getting at screen size.