fixed gen-utils.js so it works properly with/without requirejs