Fixes to allow properly building Python and Ruby bindings.