Fix compilation with giflib-5 and later

This still works with giflib-4.

I'm not familiar with this library, so please review carefully. I passed NULL to DGifCloseFile for the errorcode pointer for the giflib-5 API (passing NULL looks compatible, see http://sourceforge.net/p/giflib/code/ci/master/tree/lib/dgif_lib.c#l613) and an error code of "0" to GifErrorString, cause I didn't know what else to pass there.