core: modify DYLD_LIBRARY_PATH only if executing in installer [GH-2231]