Patch tdb to compile with the new Makefile and gcc 4.6.3