Allow bsddb3 for compatibility with Gentoo

It is the same library, but unfortunately Gentoo renamed bsddb to bsddb3 when packaging it.
If bsddb is not found, try importing bsddb3 instead, before reporting error.