Updates to decouple from linking to giflib-5.0.4
cleanup by removing uniused code
cleanup by removing more unused code
Adjustments for compiling independent of giflib linking