Add setupenv.jl to set environment variables.
Currently, this duplicates the stuff in contrib/mac/app/script, but
it should not hurt.

Hoping this helps #4222