Fix compilation

System.Diagnostics.Contracts is not available in .net 3.5 (it was
introduced in .net 4)