Fixes to support Mono 2.0