This should work for both linux and the BSD's... It should hopefully solve the corrupted environment errors Marcin sees on fbsd 9 amd64.