Fix mapbox-amd module

- Use correct global variable name
- Throw errors if dependencies are not defined.
TODO