Fix discrepancy between Mono and .NET.