fix problem with addSysPath on some systems