Fix Centos5 compile errors.

Bug #1276