giflib 5.1

Compatibility with giflib < 5.1 and giflib >= 5.1