Fixes so compiles in .NET 4