Some build fixes and mono configurations