Large deviations estimates for dynamical systems without the specification property. Application to the β-shifts