Fixed bug where require('search-index')(config) returned undefined