Pass ldflags_dirs to ruby-build

This tells ruby-build to ensure `$PREFIX/lib` exists before calling Ruby's `./configure` to work around build issues caused Ruby 2.1.0's stricter checking of `LDFLAGS` and ruby-build passing lib directories in `LDFLAGS` that don't exist.

cc @dgoodlad @wfarr