Handle different OS X versions