Environmental and biological controls on free-living nitrogen fixation