Fix CENTOS/RHEL 7 release number problem

Changes the way to fetch the operating system release number to $::operatingsystemmajrelease