Added checking for Mac OS.