Allow isMobile to exist in global space in AMD environment

The code currently adheres to an AMD environment, but breaks if the user tries to use isMobile outside of AMD's `define` context. This fix allows that.