Closes #422.
Uses the warning API properly rather than directly to stderr
Merge pull request #423 from standage/cairo

Closes #422.