You'd need to have the Tongzhi Restoration fail in some way. China was well on its way to reformation and modernization until the reactionaries like Cixi came to power.
If Daoguang or Xianfeng were more inclined towards reforms... The First Opium War would be a good point for the Emperor to realize reforms were critical.