Various attempted OS X fixes.