Fix the define function for AMD compatibility.