Dynamics of the FitzHugh-Nagumo system having invariant algebraic surfaces