Fixes warnings when building & terminal support under Haiku

Haiku's terminal uses ESC-O instead of ESC-[ as described [here](http://www.freelists.org/post/haiku/Nonstandard-CSI-code,5) in part to strictly comply with xterm. In addition, it defines unsigned ints but doesn't define DEF_UINT in its headers, which caused warning when building. These changes enable additional console functionality and remove the warnings when building.