remove dependency on libbsd