Avoid some compiler warnings.
Move compatibility code to pdf-util, avoiding some more compiler
warnings.