Fix detection of Berkeley DB 6.
PR 55277
Patch by Lars Wendler <polynomial-c gentoo.org>
(slightly modified)

Backport of r1544846 from trunk.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.5.x@1544848 13f79535-47bb-0310-9956-ffa450edef68