The API for giflib changed slightly - added function check in m4 test

Some distros are using version4, some are using version5. Searching around
seems to suggest using a check for GIFLIB_VERSION >=5, however, also added
an extra check for a version#5 function in the m4 file check.
Merge pull request #668 from JoesCat/master

The API for giflib changed slightly - added function check in m4 test