Make benchmark.js cross-platform.

Also, check for failures in all places.