Update to JS API 3.11 and use AMD patterns for dojo.