Avoid compile failures on Windows and Mac by writing TIFF files from byte array