Hamas political chief Ismail Haniyeh has hailed the "courageous" Malaysian leadership for supporting the rights of Palestinians.