Australia got over the top of Pakistan to win the first T20 in a rain-impacted match.