loaders/tiff: add r/w support for indexed files