wpaint.js: fix js exception; vichan-devel#20