Bug 983755: various bug fixes in the jpeg.js EXIF writing code