Election defeat for nationalists in Bosnia