avformat/gif: Do not write GIF89a header if loop is set to -1.