Convert C++11 style loop to C++99 style loop

Restores ability to build ZNC on older versions of GCC (such as that
supplied by RHEL/CentOS).