US ditches Pakistan when not required: Musharrarf