fix _cnapi_xpath_cast for php 5.4 (UWS-400)