Added possibility to override the way of searching for a library on each platform.
Cleaned up the changes.