Fixed compilation problems on Visual Studio 2010.
Fixed unused local typedef warnings in GCC 4.8.1