fix compile on osx