GCC 4.5 compatibility: no range-for loops.

Yet again, because I forgot to enable ObjImporter plugin when testing.
GCC 4.4 compatibility: no lambdas.

The fugly lambda probably wasn't good idea anyway. So much ugly stuff
just to avoid having mutable variable doesn't cut it.
GCC 4.4 compatibility: explicit std::reference_wrapper constructor.