fix mac osx compile error