RHEL/CentOS changes

Made some changes for this to work on RedHat family OS'es.