fixed use of undeclared name in templated class for compatibility on gcc