Mario Pasalic struck in stoppage time to give Croatia a 2-1 win over Slovenia in their final World Cup warm-up match.