Make yum script compatible with CentOS 5.8

Detect major OS version 5 or 6. Needs testing.