Nawaz gains ground on Imran ahead of polls