Fixes for AOT compilation for iOS.

These changes make it possible to use the library in Unity iOS with API Compatibility set to .NET 2.0 Subset.  I have not changed the compiled binaries.