Fix OAuth2 pk12 key download prompt.

We also use window.open() to download reports and exported CSV files. Let's put this function in XT and use it everywhere.