Adding guard for transpiling modules using global scope