Al Sadd striker Baghdad Bounedjah scored a 96th-minute header to deny Burkina Faso victory and keep Algeria's Africa Cup of Nations hopes alive.