directoryServices: allow optional extension_id to check for

(integrated from trunk branch change 937dbd4 by Todd Whiteman <toddw@activestate.com>)