locateOneObj: don't look for dynamic libs in static mode