fixed osx compile with cmake