Patch and fix building on /usr/local