modules: pull in most of FreeBSD's module linker changes