Add commonjs and amd support.