ensure global namespace if undefined

causing not found errors