Hamilton, William, active 1813-1817, Under Foreign Secretary of State