tiff: Improve grayscale support