mods to compile on gcc-4.8

STL changed has_trivial_destructor in is_trivially_destructible.
in order to support both 4.8 and 4.7 a locally defined trait is required, see

http://stackoverflow.com/questions/12702103/writing-code-that-works-when-has-trivial-destructor-is-defined-instead-of-is