Fixed NativeStructCodec bug caused by Marshal.SizeOf limitations