Fix a crash on Mac OS when sys.prefix is different from its realpath

The problem was that new_path was actually in the environment variable,
but when realpath(v) was called, it became a different string (starting
with a single backslash instead of two).
Merge pull request #1463 from lamblin/fix_macos_path_check

Fix a crash on Mac OS when sys.prefix is different from its realpath