Fixes library loading via require.