changed how to check for define.amd