Magnitude-5.1 earthquake shakes California