Fergusson, William, 1773-1846