Some hosts on Apple Silicon require that the entire bundle has a well-formed signature, rather than just the plugin binary itself. This patch checks whether the bundle signature is valid, and if it is not, ad-hoc signs the bundle before copying.