Fixed the evaluation of JS conditions

Ref https://github.com/Behat/Mink/pull/465