Group all compat shim structures together to consolidate #ifdef's.
Reviewed by: brooks, kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D29894
(cherry picked from commit 9c87db4b3c5b119809c7ff12d20ecbfd62f01996)