GIFLib updated to 5.0.5
fixed some memory allocation issuses
code cleanup