Fixed compilation errors in gcc.