Mackenzie, George, Sir, active 1685-1699, Lord Advocate