Various changes to support building gimp on the mac without X11 dependencies