adding conditional define.amd support