Semiclassical theory of the eigenvalues of a prolate cavity via the adiabatic switching method