added support for animated gifs (issue #15)