bugsnag: use amd when possible

when requirejs / amd is loaded bugsnag, will not set `window.Bugsnag` so it will not work on apps that use amd.
this fixes the issue, i ran the tests with and without requirejs and it works.

closes #387 

cc @lancejpollard