Changes to support compilation on CentOS 5