Improvements for Solaris and SmartOS

This branch includes improvements to requirements on both Solaris and SmartOS to be autolibs aware.

It also provides a workaround for a non-portable code bug in ruby-2.0.0-p0's configure script.

See issue #1774.