An unbeaten 87 from batting allrounder Mehidy Hasan has helped Bangladesh take an 81-run lead in the first Test against South Africa in Mirpur.