Some changes in order to be able to build on mono