Remove -fnested-functions from CFLAGS

Current gcc versions (4.8.2) do not support this flag anymore.
Pull giflib 5.0.5 compatibility from rwimg
Merge pull request #2 from schuay/master

Compilation fixes for current gcc & giflib