handle invalid ifd

Similar to https://github.com/lhagan/node-exif/commit/62027432318df2de77049a0077cc766f2343462e