image/gif: fix nil deref in test

LGTM=crawshaw, dave
R=golang-codereviews, crawshaw, dave
CC=golang-codereviews
https://codereview.appspot.com/104520044
debug/elf: fix nil deref in test

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://codereview.appspot.com/109470044
Merge branch 'master' into gitfix