Fixes #5741: Backport the BDB bundling in slapd from master

Ticket: http://www.rudder-project.org/redmine/issues/5741

To be merged in 2.10