Fix configure check for giflib4
Fix configure check for giflib4

This uses a combination of the old giflib4 and the new giflib5 checks.

lovell/libvips,lovell/libvips,jcupitt/libvips,jcupitt/libvips,lovell/libvips,jcupitt/libvips,lovell/libvips,jcupitt/libvips