Basic OS X support, compiles and runs on 10.7 (Lion)