Understanding and Enhancing the Transferability of Jailbreaking Attacks