Calif. measure to legalize marijuana is defeated