add js library for simulating sprintf function (used in vigstool).