fixing deprecation warning in QUnit tests.
adding optional AMD support. tested with require.js