Making plugin AMD compatible