Here's a second version of the patch that also makes sure the libraries are installed in /lib.