Adding amd and commonjs support