Fix to make Casper wait properly on Travis