fix osx build, hopefully in a way that keeps linux clean