fixes for mono build