Stop using deprecated sys/termios.h
Make Lua stop assuming gcc.
(Yes, it's still assuming LUA_USE_LINUX; will fix that later...)
Do not make library -lm into a make dependency.
Makes BSD make stop complaining. GNU make knows how to ignore this.
Improve BSD compatibility.
My popen is exploding with SIGPIPE on BSD.
No idea why, but I'm disabling it for now.
Make my ugly casts 64-bit clean.