Hamas wins Palestinian election