Boyd, Hugh, active 1763-1799, Secretary to Lord Macartney