Fix version detection for old libgif versions