Fix crashing of OS X apps on 10.8 and earlier