changes necessary for Solr 3.6.x, applied to the main Solr 4.1 branch