Convert Javascript to AMD modules.