Implement AMD support

Implemented registering zhain and zhain-ext as AMD modules for usage with RequireJS and others