Fixed compilation problems with gcc