A Γ-convergence approach to large deviations