Fixed compile errors for CentOS 6