update AMD support (more jQuery compatibility)