"i;" isn't necessary in my setup. I just added it to verify that I loaded my test data correctly.
I can't tell whether your crash is related to the problem I'm investigating. If you suspect duplicate symbols for the JPEG lib you can try to move _Image_TIFF.so away to avoid getting the second copy loaded.