fix(attach_ace): fix 'ReferenceError: ace is not defined'

When ace v1.1.1 is loaded using requirejs, reference to ace is
undefined although ace was loaded successfully. This will take care of
this case, and will use require if ace is undefined.