Add code to handle crufty Mac OSX quirks