Fix waitFor condition to fix tests on Node 0.11