An integer programming approach to the Hospitals/Residents problem with ties