Cleanup of port to MacOSX.