support commenjs and amd