Using a better, future-proof method to detect OS X version.