Use range-for instead of iterator for loops, set C++11 mode for gcc