Remove method calls that don't exist in the .NET 4.0 framework class library.