phantomjs, qt: update superenv optimisations fix.

Closes #24438.