gcore: Don't hardcode VM write permissions.
This ensures read-only PT_LOAD segments are not marked as writable in
the phdr flags.
Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D35398
(cherry picked from commit 81c857dd7e6a83924a8e45684fb94024fc3c929b)