Extension of linear functionals on $F$-spaces with bases