Fixing gcc 4.4 compilation problems