fix compile error in mac os x clang++ compiler.