Fixed handling of system dependent libraries.