Support standalone and umd

@popomore