Fix compilation for .net 3.5.