Since you know that the title of the new window must have certain forms, you should be able to find it through your title with the help of a regular expression (regular expression denoted as "/").
browser.window(:title => /known part of title/).use do
Alternatively, if you really don't know anything about the popup, you can create the last window:
browser.windows.last.use do
source share