Made OS version check compatible with Yosemite.