You must disable this feature until your host upgrades to Apache 2.4. The If construct is an integral part of the feature. If you remote the of-block you are telling the browser to not run JavaScript in any URL of your site which would, of course, break the site. There is no other way to reliably perform conditional disabling of JavaScript than using the If structure.
For what it's worth, Apache 2.4 was first released ten years ago. I don't think it's unreasonable for us to expect that hosts would have migrated away from Apache 2.2 over the last decade. That's more than one server hardware update cycle (5 to 8 years) which is the maximum period of time in which hosts rethink their base configuration.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!