AMD compatibility

source: https://github.com/umdjs/umd