adapted use of PHPCR query interfaces to PHPCR RC1 (https://github.com/phpcr/phpcr/pull/68)