Nifty posts June gains despite Tuesday dip; IT stocks drag markets