Agriculture, biodiversity and markets : livelihoods and agroecology in comparative perspective