Fix compile warnings on RHEL5