Fixed compilation errors with giflib 5

https://build.opensuse.org/package/view_file/Mono:Factory/libgdiplus0/libgdiplus0-giflib5.patch
Wouldn't it be more readable if you added a macro for `DGifOpen` with three parameters on GIFLIB_MAJOR < 5 and got rid of the ifdef here?