fix compile error with gcc 4.7