[build] Ensure the addins can be AOT'ed when they reference core libs