Pakistan had been on a three-year winless run in Tests on home soil