Make bdb test more portabish