patch for compiling with gcc-4.1