Fixes to compile with GCC 3.2