A deadly magnitude-8.1 earthquake has struck off the southern coast of Mexico.