Adjustments to work with Red Hat based distros

Adjustments to work with Red Hat based distros (RHEL, CentOS, ...). Tested in RHEL and CentOS 6.x.