env: Move env import/export functions to env.h