Mono and .NET 2 fixes