Court restores protections for endangered whales to prevent entanglement in fishing gear