fix compiling bug for clang on osx