Try to open external links in new tab

Specifically for Firefox, try to open external links in a new
tab (the default) instead of a new window. It seems that Firefox's
implementation of ``window.open`` will always try to open in a new
window of the third argument (window options) is passed, even if
it's undefined.

To get around this, check if the window options variable evaluates
to truthy and only call ``window.open`` with the third argument if
the options are actually provided.

Addresses #583