That is technical correct use of the legal term. A crime is an illegal act for which the punishment include prison. A person who lack permission to stay in a country faces deportation and ban/restriction on future visa applications, but not prison. Thus it is not a crime.