Fix DOMNode with symfony/dom-crawler v2.4.*

Since https://github.com/symfony/DomCrawler/commit/4f18ccf4b66c9c1af365756f3678d3c394d4a542, symfony/dom-crawler has changed a bit :
the \Symfony\Component\DomCrawler\Crawler::attr($attribute) has changed a bit. When asked for an attribute it now checks if the node has
the attribute and then return its value or null. So when trying to get an unknown attribute, we know get a null value instead of an
mepty string.

This commit backports part of the symfony/dom-crawler:v2.4.* logic to get the same behavior with 2.3.* so that we support both versions
of dom-crawler and have the same behavior.