Keshav Maharaj struck twice after the visitors added 37 to their overnight first-innings score