fix compilation error on osx