fixed BSD support for Mono