fixed compile on osx