Pakistan beat Sri Lanka by six wickets