Better commonjs detection