add support for registering as AMD module