Fix the way library paths are constructed.