Fixed compilation errors under gcc.