prevent `node-netpbm` from crashing on invalid JPEGs