Added support for CommonJS (Node) in markdown plugin

No functional changes, just the ability to use it in CJS/Node environment (related to #506).