West Ham were beaten 2-1 by NK Domzale as Matic Crnic scored twice to give the Slovenian underdogs a narrow advantage after the first leg of the Europa League third qualifying round tie.