maybe work with giflib < 5