js: binary: skip Math.pow if we can