Reduce repetition in ffi library loader by iterating over the names.