Revert "it makes no sense to call strlen in b_strndup"

This reverts commit ab712e2ffb263b20c094ba91d96a3d58fa18056c.