Fix UMD import to work in a variety of different situations

* See: https://github.com/umdjs/umd