Build fixes

Hi Richard,
Are you happy dealing with printerd pull requests? Here are the changes needed to get it to actually build.
Tim.