Patch layoutManager's AMD handling to play nice with r.js. Addresses #359

The latest requireJS wrangling broke my r.js build. I adapted the AMD wrapper from https://github.com/umdjs/umd/blob/master/amdWeb.js - it works for me :pray: in my r.js build. 

@nikcorg, can you verify if this patch works for you?