Make thumbnail code still work on Firefox <22