replaced std::begin/std::end s.t. tinia compiles on gcc 4.5.4