Bugfix for loading server-side AMD modules.

Added a little boilerplate which solves the issue nicely, allowing the
code to be called by browser and node equally.