Added graphicsmagick compatibility patches