Cowper, Henry Augustus, Consul General at Havana