Hijack the define() method if window.amd is detected, checking if window.Ember is defined after every call to define(). Once window.Ember is detected, unhijack define()