Fixed tests to pass in .NET 4.5, 4.0 and 2.0.