Fix SilkMarshal.DelegateToPtr for NativeAOT (#2428)