put the AMD definitions before CommonJS

Some build tools expose an `export`s object.  UMDs that check for `exports` first will cause those build tools to error out.