add the same apr fix as in serf.rb see commit 49ccb55