small fixes to command build process so that it works under mono