Log Message: Adapt to giflib-5.1 API change, and fixes error handling introduced in giflib-5.0 patch.