dl_iterate_phdr(3): provide exclusive locking for callback when statically linked.
Apparently llvm unwinder depends on the external locking for callback.
Reviewed by: cem, emaste
Tested by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26109