Paitfield, Amos, Consul at Ancona