Iterating over array instead of ArrayIterator in CurlHandle::factory