Magnitude 4.0 quake shakes western Turkey