Add pngcairo if available

Same as #172, but rebased on master