Revert "Revert "fix compile with gcc4.7""

This reverts commit 5c838375e36bfd084a46b3b3f093575d41d0f641.