fix compile error for g++