fix compile error with newer gcc