The Islamic State group has claimed responsibility for a suicide car bomb attack that killed over 30 people in Baghdad.