(merge 3.2) Issue #12383: skip test_empty_env() if compiled is compiled in
shared mode

Try also to get more informations about the Mac OS X failure: display the keys
of the environment, instead of just the number of variables.