Change AMD definition to anonymous module

Change AMD definition to create anonymous module rather than named and
create global objects whether AMD is available or not.