[cookbook] revised code to make it work with behat v2.3.5 (and skip v2.4.x)