Fix build for MacOSX