Facebook lost the first round in a battle over the legality of its automatic photo-tagging