Fix compatibility issues with macs.