fix osx compile error