Dinamo beat Sporting Lisbon to secure qualification to the Europa Cup round of 16.