Leeds United beat West Ham on penalties after a dramatic 2-2 draw to reach the FA Cup semi-finals for the first time since 1987.