giflib: compatibilty with 5.1+
sherpya's customizations