build: detect TR1 or C++11 with automake macros.

Used in fastx-collapser, should ease compilation on newer systems.