fix compilation on MacOSX