fix compile error when using g++, etc.
fix wusheng vs Halberd