Add more precise check for AMD

The require function may exist without AMD, in which case calling it would throw an error. This check should be more reliable.

It'd be great to see a release of this soon so that I can release the next version of Jewel – thanks!