Changes to make Tweak compile on Mac OS X (still as a Unix/curses