fix embarrassing search/replace bug in waitForDOM; would crash with jQuery

embarrassingly enough, when I search-replace'd $(selector).length to checkDOM(), I somehow didn't exclude the one instance where checkDOM() is actually implemented. That causes tests to crash with maximum recursion depth exceeded.