fix build on Mono (working around a bug)