Fix build and unit tests on Mono