registers library as amd module