Recognize OS X correctly and add some codes that recognize other major OSes.