fixed compilation on osx