Fixes AMD compability
Updated dist JS