bsd fixes (coreutils defaulted to if found)