Tanzid Hasan anchored the chase with a half-century as Bangladesh won with two balls to spare