The S-wave pion–nucleon scattering lengths from pionic atoms using effective field theory