Support Berkeley DB 4.1+ and 6.x