fix auto-close of Shiny app windows for portmapped URLs