Fixing compilation problems with older compilers not supporting typename.