fixing some backwards compatibility problems with old versions of gladd.js