Fix test failures with APCu 4.0.2

In 4.0.2 APCu changed (again!) the signature of APCIterator and therefore a special treatment is needed to work around that change.