fix compile error when gcc version is lower than 4.8