check amd first

`radio` is `undefined` while loading it in Karma test runner with amd. The issue is the that in Karma `module` is defined so, the code assumes that it's common js module. Should add the check amd first.