Mexico records 5.1 quake