Fix build with giflib >= 5.1.0.