changes to work with winrt

winrt doesn't have a Serializable attribute and reflection calls have changed slightly.