Who did the Manchus make an Ally with to seize control of Beijing?