Fixed compilation error when targetting Mega. Error is caused by #2039 and this fix is just a workaround