Make conditionally as CommonJS module as per issue #309