President Biden signs bill that averts rail strike despite opposition from unions