Convert d.js (dice) to CommonJS module.