Render_math now working with markdown versions >= 2.5

Markdown version 2.5 made non-backward compatible changes. This PR enables the plugin to work with versions < 2.5 and versions >= 2.5