core: Remove DYLD_LIBRARY_PATH if command not in installer [GH-2219]