fix compilation issues under .NET 3.5