Change client module to unify commonjs and amd