Fixes for previous ruby changes

Fixed previous two changes to be conditional for building on ARM.