Northern Ireland regroup from Friday's opening defeat by Australia to earn a crucial 67-50 win over Sri Lanka at the World Cup.