Add support for building libaugeas on solaris and eliminate compilation warnings

I haven't tested the changes on Mac, but it should still work.