Non-deprecated method for determining OSX version.

Apple deprecated Gestalt in 10.8 without providing a sane alternative. I've implemented the current recommended approach to accomplish what Gestalt previously did (and thus eliminate my current project's annoying warning).