Fixes for building under mono