fix compilation errors, OSX 10.6-10.9

* add missing headers
* see issue https://github.com/Swordifish90/cool-old-term/issues/12