A finite element formulation for global linear stability analysis of a nominally two‐dimensional base flow