Remove unnecessary imports.
Add typename (GCC needs this)
Earlier versions of GCC don't fail on unknown -Wno- options, so we can't really
auto-detect them accurately.