XWIKI-8687: Allow the user to specify the previously installed UI when upgrading from very old versions
* Make it work when JavaScript is disabled.
(cherry picked from commit cbcd3004656a4d2d68549c82176b88f017b9f659)