Fix a segmentation error when loading GIF with setting requested component = 4