Fixed template specializing for gcc and other more compliant compilers