Fix casperJS tests