Bush wins deal on anti-terror law