Handle references (\ref and \eqref) properly when there is a <base> tag. Resolves issue #1589 (closed).
\ref
\eqref
<base>