Fix NFS when DHCP settings use a custom IP range

Only use the static IP if it is indeed a static IP. Otherwise assume
it's DHCP and get the IP that way.

Fixes #4433