Use BerkeleyDB where we can