common: fix for clearing environment vars in BSD