Fix segmentation fault observed on OpenBSD/sparc64

A non-readable mapping of a file causes an access violation in
the pack tests. Always use PROT_READ to work around this.