make Durandal compatible with the dojo AMD loader

replace CommonJS wrapping; add checks in system.js for dojo and
requirejs