Fix building error with gcc < 4.5 (tested with gcc4.3 under SLES 11 SP3)

Fix error typename outside of template  for old gcc compiler.