Fixes to RHEL/CentOS 6 support

Signed-off-by: Samuli Seppänen <samuli.seppanen@gmail.com>