Revert "Fixed compile errors for CentOS 6"

This reverts commit 6aede7e4f4418b8a7e392ba3ffb6f1bcdb6fe68a.
Revert "Revert "Fixed compile errors for CentOS 6""

This reverts commit 5e968dc68ebae10e8265efc4a3f009ccdea6740d.