Replace explicit TARGET_* variables with COMPAT_* versions defined based on where the file is being included.
Also, require that bsd.compat.mk be included directly. It's not going to be widely used so always loading it in bsd.prog.mk doesn't make sense. Instead users can include it directly.