Fixed csharp code so that it compiles on linux