GCC 4.6 is missing some const_iterator support.

Relevant bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54577. In
particular, `vector<>::insert` only takes non-const iterators, so some
changes needed to be made.