make some changes for gcc unittest.