Move soname extraction and lib finding functions to utils module, don't use Python 2.7-specific subprocess functions.