improved check of Mac OS.
Merge pull request #44 from Milly/feature/improved-check-of-MacOS

improved check of Mac OS.