Instead of `"-L#{Formula.factory('libpng').lib}"` please use `"-L#{Formula.factory('libpng').opt_prefix}/lib" so minor updates to libpng will not break qt5.

Also, I would prefer
```
if condition
  args << ...
else
  args << ...
end
```
instead of two `... if MacOS.version ....` statements