Bug #17931: Use tr1/type_traits with GNU compilers

Signed-off-by: Miklos Espak <m.espak@ucl.ac.uk>