compiles on mac and centos5