Death toll reaches 39 in quake that hit Turkey, Greek island