Officials: French police attacker pledged allegiance to IS