fixes for bsd and gsiftp