A diary written by Thomas Millard as the Lady Shore was seized off the coast of South America in 1797 has sold for £12,500 at auction.