You need the source of the APK to make such edit. I made such edit for on my last ROM to make it work in Japan (Softbank) . However, it's impossible to find the source code of MIUI.
Could the MIUI-devvers add a menu item so that we can enter our own UserAgent? It's a 10 minute coding work but...