Support the built-in type-trait support in gcc 4.7 and later. Thanks to Albert Wong for the patch.