Don't allocate lots of memory when reading TIFFs with infinite rows per strip.

This is an alternate pull request for #3289 that will hopefully not produce any compiler warnings.