James Elphinston, 1721-1809