fix xpath crash when used on elements initialized by __construct

When creating children, pass current node as root element. This worked fine for simplexml_load_string, but was working incorrectly when called directly from SimpleXMLElement's __construct.

This fixes both an internal issue at FB, and also #1067.