If you are not using the polaroid layout, you can configure to exclude this script. It's the official modernizer library, I don't think there is anything we can do about it, it's a 3rd party open source script developed on github.
If you don't use the polaroid layout, then ho to the Compatibility Options submenu, and turn off the Load the polaroid gallery JS? option: https://i.imgur.com/MuDKvsB.png
The script then won't load anymore. That's the best solution I can think of.Best,
If you like my products, don't forget to rate them on codecanyon :)