Change InvalidDataException to IOException

Done to allow for compilation in Unity with .NET 2.0 subset API