Fix CommonJS detect