Misc fixes to Ruby build