patch for cups pages printed plugin

from https://www.mail-archive.com/collectd@verplant.org/msg01052.html
tweaked to support current collectd src
fix build

plugin building changed in the last four years, I guess.
Merge branch 'cups_plugin'