Add OSX libs
OSX select() bugfix, and attempt to use 500kbaud
Hack for gcc 4.2
Fix buffer bug