use c++ style casts im tiff_reader
add (currently failing) tests for #1927