Fix build with giflib >= 5.1.0.
Merge branch 'barthalion/master'