fix compile issue on clang/gcc