Fix tests for commonjs module builds. [ci skip]