allow has_xpath? to match a scalar value in addition to an array of nodes, for use with xpath functions