osx compile fixes