Fix the problem that can't be compiled under CentOS.
Merged with master.