Fix #1603 :numref: doesn't work correctly when label contain underscore

If label contains underscore, the underscores are replaced with hyphens on normalization.
:numref: confuses the normalization with explicit notation.
This fix uses `target` variable insted of labelid to check the role is explicit or not.

--HG--
extra : amend_source : dd11e31758e158f9da4319db5869f455ff42acdc