fix compilation on osx