Improve reliability of OS type determining.