Fix app.js ensuring global.environment is set in time

Became needed again now that we use CartoData ourselves
See #28