fix compile on osx using c++11