Allow selection of giflib or libungif

the Patch is based on the giflib PATCH from neutrion-mp:

Patch 1: f0ea5c75c7cf3e9cbed5ef08e437311ccb02f28c
Patch 2: d9dce5c10fe0cff90ba4cb21ffb3149a6a275f28

Signed-off-by: Christian Ege <k4230r6@gmail.com>