Precise compat fixes

Howdy folks,

A small set of patches to keep backwards compat with Ubuntu 12.04 LTS