casperjs: Fix api-tool-tests.js for recent changes.