Nabi and Shahidi hit half-centuries before Ghazanfar returned career best figures of 6 for 26 to stun Bangladesh