Added support for older versions of nodejs