Upper limit on the cosmic-ray photon fraction at EeV energies from the Pierre Auger Observatory