You can specify `BASE_DIR` on the commandline instead of using a patch:

```ruby
system "make", "install", "BASE_DIR=#{prefix}"
```