Restored version check on gcc for unused-typedef warning.

This reverts commit f0962d39f1982212017a099f4edd4d6f6d3ba447.