Fixed issues with MacOSX builds.