Fix issue 317

This is the exact same fix as mentionned in the GC issue,
cf. https://code.google.com/p/libarchive/issues/detail?id=317