Enhance gif encoding with gif.js

To be merged after minify-statics