fix check for commonjs (close #74)