load as AMD module if AMD is available

Both jquery and jquery-ui implement AMD module loading. It would be convenient if nestedSortable did too!