Slightly modified to better fit in architecture (moved to related GHOST SystemPaths)
Thanks to Harley Acheson for the research and for providing the original patch.
Note: I added empty function for X11(Linux) and Mac (Carbon and Cocoa) to be implemented still.