WaveletMatrix implementation for JS/JSX/AMD/CommonJS