netdev.tests: Add fixes for environment variables

On some platforms overriding `env` led to problems. This fixes this (+ minor include fix)