Solution: use libbsd by default when available, and the internal implementation only as a fallback, to take advantage of Linux distros maintenance of the string libraries.