Patched AOT compiler to fix problem with Marshal.PtrToStructure