osx needs ifdef guards, will fix