define SYMBOLIC_LINK_FLAG_DIRECTORY if not defined (cherry picked from commit 0fd259ed7a597c32d619190898bb5780a1ddbdd4)