Energetic particle stabilization of ballooning modes in tokamaks