Fix qt on Mavericks

Pulling in changes https://github.com/Homebrew/homebrew/commit/121d6e5e3fbe70817f290c5c6914f6c94521188e#diff-420520d17e6ad2a69cb22045cd429b4c and https://github.com/Homebrew/homebrew/commit/d94981b90a6a35a8b33a2758129bf231961425af#diff-420520d17e6ad2a69cb22045cd429b4c