Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritization